﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using Distrackting.BusinessLayer;
using Distrackting.DataLayer;
using System.Collections.Generic;
using System.Text;

namespace Distrackting.PresentationLayer
{
    public partial class VerPercFotos : System.Web.UI.Page
    {

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (Request.QueryString["perc"] == null)
                {
                    Mensagens.AdicionarErro("Não foi possível encontrar o percurso pretendido");
                    Response.Redirect(ResolveUrl("Public.aspx"));
                }
                else
                {
                    initPerc();
                }
            }
            catch (Exception ex)
            {
                Mensagens.AdicionarErro(ex.Message);
            }
        }

        public void initPerc()
        {

            Guid cod_perc = new Guid(Request.QueryString["perc"].ToString());
            Label1.Text = GerirPercursos.getPercurso(cod_perc).nome;

            HyperLink4.NavigateUrl = "VerPerc.aspx?perc={" + cod_perc + "}";
            HyperLink1.NavigateUrl = "VerPercMapa.aspx?perc={" + cod_perc + "}";
            HyperLink2.NavigateUrl = "VerPercFotos.aspx?perc={" + cod_perc + "}";
            HyperLink3.NavigateUrl = "VerPercTest.aspx?perc={" + cod_perc + "}";

        }


    }

}
